package vn.buffalocoders.rikos.ui.common;


import java.util.Date;

public class RikoPublisher {
	private boolean _bStatus = false;
	private Date _createDate = null;
	private Integer _id = 0;
	private String _name = "";
	private String _address = "";
	private float _lat = 0.0f;
	private float _lon = 0.0f;
	
	public RikoPublisher(){
		
	}
	public RikoPublisher(String Status, String createDate, 
			Integer id, String name, String address, 
			String lat, String lon) {
		if(Status == "success")
			_bStatus = true;
		if(Status == "failure")
			_bStatus = false;	
		
		_createDate = Helper.ConvertStrToDate(createDate);
		_id 		= id;
		_name 		= name;
		_address 	= address;
		_lat 		= Float.parseFloat(lat);
		_lon 		= Float.parseFloat(lon);	
	}
	
	public RikoPublisher(RikoPublisher publisher) {
		_bStatus 	= publisher.getStatus();
		_createDate = publisher.getCreateDate();
		_id 		= publisher.getId();
		_name 		= publisher.getName();
		_address 	= publisher.getAddress();
		_lat 		= publisher.getLat();
		_lon 		= publisher.getLon();
	}
	
	
	public boolean getStatus() {
		return _bStatus;
	}
	
	public void setStatus(String Status){
		if(Status == "success")
			_bStatus = true;
		if(Status == "failure")
			_bStatus = false;	
	}
		
	public Date getCreateDate() {
		return _createDate;
	}
	
	public void setCreateDate(String cDate){
		_createDate = Helper.ConvertStrToDate(cDate);
	}
	
	public Integer getId() {
		return _id;
	}
	
	public void setId(Integer id){
		_id = id;
	}
	public String getName() {
		return _name;
	}
	
	public void setName(String name){
		_name = name;
	}
	
	public String getAddress() {
		return _address;
	}
	
	public void setAddress(String address){
		_address = address;
	}
	public float getLat() {
		return _lat;
	}
	
	public void setLat(String lat){
		_lat 		= Float.parseFloat(lat);
	}
	public float getLon() {
		return _lon;
	}
	public void setLon(String lon){		
		_lon 		= Float.parseFloat(lon);	
	}
}
